Skip to content

Consolidated community contributions: AI architecture overhaul, tablet optimization, localization (ja/ar/pt-BR/fr), customizable library tabs, playlist concurrency fix, UI improvements, security hardening, and code quality pass#2404

Open
daedaevibin wants to merge 127 commits into
PixelPlayerHQ:masterfrom
Veridian-Zenith:master

Conversation

@daedaevibin

Copy link
Copy Markdown
Contributor

To place everything into one place, along with other improvements and work, I have merged all the pending PRs into my own fork and I am working currently to resolve conflicts.

rebornlokii and others added 30 commits June 13, 2026 09:39
Updated Italian strings in changelogs for improved clarity and consistency.
…anguage enum and remove legacy translation keys
Add widthIn(max = 540.dp) to dialogs and several setup pages to constrain content on wide screens and import required layout helpers. Rename the SineWaveLine parameter from `waves` to `wavesDensity`, update its KDoc and default, and adjust the theta calculation to scale density relative to a 380dp baseline width. Update all call sites (BetaInfoBottomSheet, ChangelogBottomSheet, PlaylistContainer, SetupScreen, etc.) to use `wavesDensity`. Also small UI tweaks in SetupScreen: comment out CenterHorizontally alignment, reduce a spacer height, and set the welcome artwork to requiredWidth(380.dp). These changes improve responsive layout behavior and make the sine wave drawing density consistent across different widths.
still working on the min width
and the back animation
Renamed the central AI orchestration class from AiOrchestrator to AiHandler
and updated all references across the codebase.
…s all providers

- Create UnifiedModelFilter utility that filters out embedding, image, TTS,
  speech, moderation, vision-only, and other non-chat models
- Update GeminiAiClient to use UnifiedModelFilter instead of hardcoded markers
- Update GenericOpenAiClient to use UnifiedModelFilter instead of inline filter
These providers all use OpenAI-compatible APIs. Switching from dedicated
client classes to GenericOpenAiClient eliminates duplicate code. The old
class files are kept on disk but no longer referenced.
Add CUSTOM provider with hasConfigurableUrl=true and requiresApiKey=true
for user-configured self-hosted/custom API endpoints.
CUSTOM provider uses GenericOpenAiClient with an empty default URL (user
configures it via settings). createClientWithUrl allows creating a client
with a custom base URL for configurable-URL providers.
…layerHQ#2371

PR #41 refactored AI clients into OpenAiCompatibleClient base class.
Upstream PixelPlayerHQ#2371 deleted separate clients entirely, unified into
GenericOpenAiClient. Resolution: accept PixelPlayerHQ#2371's deletions, remove
now-dead OpenAiCompatibleClient and its test, update AiClientFactoryTest
to match new architecture.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@daedaevibin daedaevibin marked this pull request as draft June 19, 2026 03:03
daedaevibin and others added 2 commits June 19, 2026 03:04
…convention

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ated-upstream-prs

Consolidated upstream PRs: AI overhaul, tablet support, localization (ja/ar/pt-BR/fr), tab management, playlist fix, UI fixes, deps bump
@daedaevibin

Copy link
Copy Markdown
Contributor Author

Summary

Brings together 12 community PRs, security hardening, error observability, code deduplication, performance optimizations, and test coverage across 169 files (7,980 insertions, 4,032 deletions).


Community PRs Consolidated

Upstream PR Title Author
#2400 fix(playlists): prevent lost playlist edits from concurrent song removals AmrEldeeb5
#2397 chore(deps): bump com.google.genai:google-genai 1.58.0 → 1.59.0 dependabot
#2396 Feature/localization ja (Japanese) fujimon0722
#2383 ui: fix layout jump when collapsing telegram channel topics + Telegram/GitHub buttons in About Ayaanh001
#2380 feat: Add complete Arabic translation and configure app languages Hisham-Alzamzami
#2373 feat(removing library tabs): implement customizable tab management (add/remove) Ayaanh001
#2371 feat(ai): massive architecture overhaul, new providers, and generation tuning VoidX3D
#2363 Feat: tablet optimization ZL114514
#2355 feat(i18n): add pt-BR localization retrozinndev
#2353 Update French lyrics mode strings for consistency rebornlokii
#2352 Restructure Arabic localization resources and change AppLanguage behaviour adlifarizi
#2347 Update Strings to show beta 7.5 rebornlokii

AI Architecture Overhaul (#2371)

  • Renamed AiOrchestratorAiHandler; removed per-provider clients (DeepSeekAiClient, GroqAiClient, MistralAiClient) — all OpenAI-compatible providers now use GenericOpenAiClient with per-provider config in AiClientFactory.
  • Added AiResponseCleaner for robust response parsing, UnifiedModelFilter for chat model filtering, and new providers (Ollama, Custom with configurable base URL).
  • AiSystemPromptEngine overhauled with chain-of-thought prompting, few-shot examples, and quality guardrails.
  • GenericOpenAiClient.ChatRequest extended with topP, topK, maxTokens, presencePenalty, frequencyPenalty — all configurable from AiPreferencesRepository.
  • New UI: SearchableModelSelector, generation parameter sections, and song data configuration in AI settings.

Tablet Optimization (#2363)

  • Adaptive HomeScreen layout with PlayerInternalNavigationBar for landscape/tablet form factors.
  • PlayerSheetPredictiveBackHandler and SineWaveLine adjustments for larger screens.

Localization

Customizable Library Tabs (#2373)

  • ReorderTabsSheet extended with add/remove functionality for library tabs.
  • Persistent tab configuration stored in UserPreferencesRepository.
  • PlayerViewModel handles saving and resetting tab orders; LibraryScreen dynamically renders based on user preferences.

Playlist Concurrency Fix (#2400)

  • PlaylistPreferencesRepository prevents lost edits from concurrent song removals.
  • New PlaylistSongCountTest androidTest for verification.

UI Improvements (#2383)

  • Fixed layout jump when collapsing Telegram channel topics in TelegramDashboardScreen.
  • Added GitHub and Telegram social chips to AboutScreen with localized strings across all supported languages.

Security Hardening

  • OkHttp response body leaks: All AI client and GDrive API HTTP calls wrapped with response.use {} to prevent connection leaks on error paths.
  • JSON injection: GDriveApiService.createFolder now uses JSONObject builder instead of string interpolation.
  • Empty auth header: GDriveApiService.getAuthHeader() fails fast via require() instead of silently sending "Bearer ".
  • Netty dependency: Updated constraint from non-existent 4.2.28.Final to latest actual release 4.2.15.Final (addresses CVE-2025-48625, CVE-2023-44487, CVE-2025-24970).
  • Thread safety: Added @Volatile to GDriveStreamProxy.server, actualPort, startJob.

Code Quality

  • Refactoring: Extracted ServerUrlUtils for URL normalization shared between NavidromeCredentials and JellyfinCredentials.
  • Performance: Cached 6 Regex patterns in LyricsRepositoryImpl companion object that were recompiled per-call.
  • Error handling: Added Timber.w() logging to 20+ silent catch blocks across backup, database, network, presentation, service, and utility layers. Removed dead try/catch in ChangelogBottomSheet.openUrl.
  • Bug fix: Fixed AbsoluteSmoothCornerShape parameter ordering in NavBarCornerRadiusScreen — smoothness params were misaligned with corner radii.
  • Import ordering: Sorted imports alphabetically in GenreCategoriesGrid; replaced inline FQN usage with explicit imports.
  • Spanish comments: Translated all Spanish comments to English across SongEntity, PlaylistViewModel, OtherShapes, GenreCategoriesGrid.

Tests

  • AiClientFactoryTest — verifies all providers create correct client types and reject blank API keys.
  • CloudMusicUtilsTest — tests for cloud music utility functions.
  • ServerUrlUtilsTest — tests for URL normalization/validation.
  • PlaylistSongCountTest — androidTest for playlist concurrent edit protection.

Dependency Updates

  • com.google.genai:google-genai 1.58.0 → 1.59.0
  • actions/checkout bumped in CI workflows
  • Gradle dependencies group update

Conflict Resolution Notes

@daedaevibin daedaevibin changed the title Consolidated PR merge Consolidated community contributions: AI architecture overhaul, tablet optimization, localization (ja/ar/pt-BR/fr), customizable library tabs, playlist concurrency fix, UI improvements, security hardening, and code quality pass Jun 19, 2026
@daedaevibin daedaevibin marked this pull request as ready for review June 19, 2026 03:19
lostf1sh and others added 9 commits June 19, 2026 17:58
- Add PAUSE_ON_VOLUME_ZERO DataStore key + flow + setter to UserPreferencesRepository
- Collect pref in MusicService and pause playback when volume hits 0
- ReplayGain programmatic volume adjustments are unaffected
- Add Python script to inject localized strings into all 12 locale files
- Add ContentObserver on Settings.System.CONTENT_URI to detect hardware
  volume key changes and pause when media stream reaches 0
- Registers observer in onCreate, unregisters in onDestroy
- Add Volume subsection with SwitchSettingItem to SettingsCategoryScreen
- Add pauseOnVolumeZero field to SettingsUiState
- Add pauseOnVolumeZeroFlow to SettingsViewModel combine() block
- Add setPauseOnVolumeZero() setter in SettingsViewModel
- Inject settings_volume_section, settings_pause_on_volume_zero and _desc
  into strings_settings.xml for all 12 locales
- Remove duplicate keys from strings.xml (AAPT2 duplicate resources fix)
- Fix rogue spaces in Korean strings_settings.xml entries
Bumps the gradle-dependencies group with 1 update: [gradle-wrapper](https://github.com/gradle/gradle).


Updates `gradle-wrapper` from 9.5.1 to 9.6.0
- [Release notes](https://github.com/gradle/gradle/releases)
- [Commits](gradle/gradle@v9.5.1...v9.6.0)

---
updated-dependencies:
- dependency-name: gradle-wrapper
  dependency-version: 9.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gradle-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
…dependencies-30ba516ba3

chore(deps): bump gradle-wrapper from 9.5.1 to 9.6.0 in the gradle-dependencies group
@VoidX3D

VoidX3D commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

WoW!

@daedaevibin

Copy link
Copy Markdown
Contributor Author

incoming commits:

Merge PR #2413 and resolve conflicts in CloudMusicUtilsTest

Merge PR #2415 and resolve conflicts in strings_settings.xml (Arabic)

@daedaevibin

daedaevibin commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

@theovilardo

This will continue to be updated when new PRs are added unless you say to leave it here, in order to safely track all items properly


Next planned tasks after merging of this PR:


TODO - Upstream Issues for PixelPlayer

High Priority

Medium Priority

Low Priority

shiqizhenyes and others added 7 commits June 21, 2026 07:42
- Refine the visual effect and usage scope of the Gaussian blur while
- optimizing its overall rendering smoothness. Additionally, add the new
- `PlayingEqIconV2` component, featuring a spectrum animation that dynamically synchronizes with the music rhythm.
- AudioRmsSink: Introduce exponential decay for `maxRms` to prevent the visualizer from getting stuck after loud volume spikes.
- AudioRmsSink: Add support for parsing 32-bit Float PCM encoding to fix amplitude calculation in Hi-Fi mode.
- PlayingEqIconV2: Remove redundant `derivedStateOf` and `remember` wrappers around high-frequency data classes to eliminate recomposition overhead and animation stutters.
Processing all songs in a single pass exhausted the 256 MB heap on
devices with large Telegram channels (reproduced at 65k songs, PixelPlayerHQ#2172).
Songs are now processed and flushed to Room in batches of 500, keeping
peak memory bounded regardless of channel size.

- Album songCounts accumulated across all chunks; every chunk re-upserts
  albums it touches so the final count is always correct
- Deletion diff runs after all chunks using the complete synced ID set
- Deletions batched in 500s to respect SQLite variable limits
- Remove duplicate getAllArtistsListRaw() call (was called twice)

Co-authored-by: Claude <claude@anthropic.com>
@daedaevibin

daedaevibin commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Merged #2425 updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.